Sensor Fusion for Kinetis MCUs (ISSDK/KSDK version)
standard_build.h File Reference

Go to the source code of this file.

Macros

#define THISBUILD   700
 
#define THISCOORDSYSTEM   NED
 
#define F_ALL_SENSORS   0x001F
 
#define F_9DOF_GBY_KALMAN   0x4000
 
CoordinateSystemBitFields

These defines determine the frame of reference (x, y, z axes and Euler angles) standard to be used for a particular build. Change THISCOORDSYSTEM to whichever of NED, ANDROID or WIN8 you prefer.

#define NED   0
 
#define ANDROID   1
 
#define WIN8   2
 
SensorBitFields

These bit-field values are used to declare which sensor types are used in the application. Change bit-field values to 0x0000 for any features NOT USED

#define F_USING_ACCEL   0x0001
 
#define F_USING_MAG   0x0002
 
#define F_USING_GYRO   0x0004
 
#define F_USING_PRESSURE   0x0008
 
#define F_USING_TEMPERATURE   0x0010
 
FusionSelectionBitFields

These bit-field values are used to declare which sensor fusion algorithms are used in the application. You can use more than one, altough they all run from the same data. Change individual bit-field values to 0x0000 for any features NOT USED.

#define F_1DOF_P_BASIC   0x0100
 
#define F_3DOF_G_BASIC   0x0200
 
#define F_3DOF_B_BASIC   0x0400
 
#define F_3DOF_Y_BASIC   0x0800
 
#define F_6DOF_GB_BASIC   0x1000
 
#define F_6DOF_GY_KALMAN   0x2000
 
SensorParameters

FIFO sizes effect the size of the sensor data structures. ODR refers to "Output Data Rate"

#define ACCEL_FIFO_SIZE   32
 
#define MAG_FIFO_SIZE   16
 
#define GYRO_FIFO_SIZE   32
 
#define ACCEL_ODR_HZ   200
 
#define MAG_ODR_HZ   200
 
#define GYRO_ODR_HZ   400
 
#define FUSION_HZ   40
 
#define FAST_LOOP_HZ   80
 
#define OVERSAMPLE_RATE   FAST_LOOP_HZ/FUSION_HZ
 

Detailed Description

This file contains only those parameters that directly relate to fusion implementation choices. Board dependencies are in hal_<shield_board>.h. Consult the Sensor Fusion User Guide for guidance and details.

Definition in file standard_build.h.

Macro Definition Documentation

#define ACCEL_FIFO_SIZE   32

FXOS8700 (accel), MMA8652, FXLS8952 all have 32 element FIFO.

Definition at line 79 of file standard_build.h.

Referenced by FXLS8471Q_Read(), and FXOS8700_Init().

#define ACCEL_ODR_HZ   200

(int) requested accelerometer ODR Hz (over-rides MAG_ODR_HZ for FXOS8700)

Definition at line 82 of file standard_build.h.

#define ANDROID   1

identifier for Android axes and angles

Definition at line 46 of file standard_build.h.

Referenced by fRunAccelCalibration().

#define F_1DOF_P_BASIC   0x0100

1DOF pressure (altitude) and temperature algorithm selector - 0x0100 to include, 0x0000 otherwise

Definition at line 67 of file standard_build.h.

Referenced by CreateAndSendPackets(), and initSensorFusionGlobals().

#define F_3DOF_B_BASIC   0x0400

3DOF mag eCompass (vehicle/mag) algorithm selector - 0x0400 to include, 0x0000 otherwise

Definition at line 69 of file standard_build.h.

Referenced by CreateAndSendPackets(), initializeFusionEngine(), and initSensorFusionGlobals().

#define F_3DOF_G_BASIC   0x0200

3DOF accel tilt (accel) algorithm selector - 0x0200 to include, 0x0000 otherwise

Definition at line 68 of file standard_build.h.

Referenced by CreateAndSendPackets(), and initSensorFusionGlobals().

#define F_3DOF_Y_BASIC   0x0800

3DOF gyro integration algorithm selector - 0x0800 to include, 0x0000 otherwise

Definition at line 70 of file standard_build.h.

Referenced by CreateAndSendPackets(), initializeFusionEngine(), and initSensorFusionGlobals().

#define F_6DOF_GB_BASIC   0x1000

6DOF accel and mag eCompass algorithm selector - 0x1000 to include, 0x0000 otherwise

Definition at line 71 of file standard_build.h.

Referenced by CreateAndSendPackets(), initializeFusionEngine(), and initSensorFusionGlobals().

#define F_6DOF_GY_KALMAN   0x2000

6DOF accel and gyro (Kalman) algorithm selector - 0x2000 to include, 0x0000 otherwise

Definition at line 72 of file standard_build.h.

Referenced by CreateAndSendPackets(), initializeFusionEngine(), initSensorFusionGlobals(), and SaveGyroCalibrationToNVM().

#define F_9DOF_GBY_KALMAN   0x4000
#define F_ALL_SENSORS   0x001F

Referenced by initSensorFusionGlobals(), and main().

#define F_USING_ACCEL   0x0001

nominally 0x0001 if an accelerometer is to be used, 0x0000 otherwise

Definition at line 55 of file standard_build.h.

Referenced by CreateAndSendPackets(), FXLS8471Q_Idle(), FXLS8471Q_Init(), FXLS8471Q_Read(), FXOS8700_Idle(), FXOS8700_Init(), and initSensorFusionGlobals().

#define F_USING_GYRO   0x0004

nominally 0x0004 if a gyro is to be used, 0x0000 otherwise

Definition at line 57 of file standard_build.h.

Referenced by CreateAndSendPackets(), and initSensorFusionGlobals().

#define F_USING_MAG   0x0002

nominally 0x0002 if an magnetometer is to be used, 0x0000 otherwise

Definition at line 56 of file standard_build.h.

#define F_USING_PRESSURE   0x0008

nominally 0x0008 if altimeter is to be used, 0x0000 otherwise

Definition at line 58 of file standard_build.h.

Referenced by initSensorFusionGlobals().

#define F_USING_TEMPERATURE   0x0010

nominally 0x0010 if temp sensor is to be used, 0x0000 otherwise

Definition at line 59 of file standard_build.h.

Referenced by initSensorFusionGlobals().

#define FAST_LOOP_HZ   80

Over Sample Ratio * FUSION_HZ when using no FIFO.

Definition at line 86 of file standard_build.h.

#define GYRO_FIFO_SIZE   32

FXAX21000, FXAS21002 have 32 element FIFO.

Definition at line 81 of file standard_build.h.

#define GYRO_ODR_HZ   400

(int) requested gyroscope ODR Hz

Definition at line 84 of file standard_build.h.

#define MAG_FIFO_SIZE   16

FXOS8700 (mag), MAG3110 have no FIFO so equivalent to 1 element FIFO.

Definition at line 80 of file standard_build.h.

Referenced by FXOS8700_ReadMagData(), and MAG3110_Read().

#define MAG_ODR_HZ   200

(int) requested magnetometer ODR Hz (over-ridden by ACCEL_ODR_HZ for FXOS8700)

Definition at line 83 of file standard_build.h.

#define NED   0

identifier for NED (Aerospace) axes and angles

Definition at line 45 of file standard_build.h.

Referenced by fRunAccelCalibration().

#define OVERSAMPLE_RATE   FAST_LOOP_HZ/FUSION_HZ

Definition at line 87 of file standard_build.h.

Referenced by read_task().

#define THISBUILD   700

define build number sent in debug packet for display purposes only

Definition at line 38 of file standard_build.h.

Referenced by CreateAndSendPackets().

#define THISCOORDSYSTEM   NED

Referenced by fRunAccelCalibration().

#define WIN8   2

identifier for Windows 8 axes and angles

Definition at line 47 of file standard_build.h.

Referenced by fRunAccelCalibration().